
def colour(colour,name=0):
    """simple colour-dictionary: unrecognised colours will return a list of available colours"""
    import random
    colour_dict={
        "blue":(13,13,102),
        "red":(142,0,0),
        "dgreen":(0,53,0),
        "lgreen":(42,106,6),
        "dolive":(144,155,7),
        "lolive":(169,169,97),
        "white":(239,239,239),
        "lgrey":(158,158,158),
        "mgrey":(47,47,47),
        "dgrey":(18,18,18)
        }


##    colour_dict["grey1"]="DarkGrey",(70,70,70)
##    colour_dict["grey2"]="MediumGrey",(120,120,120)
##    colour_dict["grey3"]="LightGrey",(180,180,180)
##    colour_dict["white"]="White",(220,220,220)
##    colour_dict["olive1"]="DarkOlive",(114,114,56)
##    colour_dict["olive2"]="LightOlive",(156,156,78)
##    colour_dict["yellow1"]="DarkYellow",(253,177,0)
##    colour_dict["yellow2"]="LightYellow",(255,203,83)
##    colour_dict["blue1"]="DarkNavyBlue",(0,0,128)
##    colour_dict["blue2"]="LightNavyBlue",(0,0,210)
##    colour_dict["blue3"]="DarkSteelBlue",(0,101,149)
##    colour_dict["blue4"]="LightSteelBlue",(0,128,192)
##    colour_dict["green1"]="DarkForestGreen",(0,72,0)
##    colour_dict["green2"]="LightForestGreen",(0,85,0)
##    colour_dict["green3"]="DarkGrassGreen",(0,128,0)
##    colour_dict["green4"]="LightGrassGreen",(0,176,0)
##    colour_dict["red1"]="DarkRed",(128,0,0)
##    colour_dict["red2"]="LightRed",(206,0,0)
##    colour_dict["brown1"]="DarkBrown",(128,64,0)
##    colour_dict["brown2"]="LightBrown",(185,92,0)
##    try:
    if colour=="random":
        colour=random.sample(colour_dict,1)[0]
    if name==0:
        return colour_dict[colour]
    else:
        return colour_dict[colour],colour
##    except:
##        print "ERROR"
##        for list in colour_dict:
##            print list


